﻿@model Venue
@{
    ViewBag.Title = (Model == null) ? "Create New Venue" : "Edit Venue";
}

<p>Training Modules must have associated Venues, which provides details for local accommodations, like hotel bookings.</p>

@using (Html.BeginForm("Edit", "Venue"))
{
    @Html.ValidationSummary(true, "Please correct the errors below and try again.")
    <div>
        <fieldset>
            <legend>Venue Details</legend>
            <div class="editor-label">
                @Html.LabelForWithReq(m => m.Name)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Name)
                @Html.ValidationMessageFor(m => m.Name)
            </div>
            
            <div class="editor-label">
                @Html.LabelForWithReq(m => m.Country)
            </div>
            <div class="editor-field">
                @Html.CountryDropDownFor(m => m.Country)
                @Html.ValidationMessageFor(m => m.Country)
            </div>
            <div class="editor-label">
                @Html.LabelForWithReq(m => m.Address)
            </div>
            <div class="editor-field">
                @Html.TextAreaFor(m => m.Address, 3, 40, null)
                @Html.ValidationMessageFor(m => m.Address)
            </div>

            <div class="horiz">
                <div class="item">
                    @Html.LabelForWithReq(m => m.City)
                    @Html.TextBoxFor(m => m.City)
                </div>
                <div class="item">
                    @Html.LabelForWithReq(m => m.State)
                    @Html.StateDropDownFor(m => m.State)
                </div>
                <div class="item">
                    @Html.LabelForWithReq(m => m.ZipCode)
                    @Html.TextBoxFor(m => m.ZipCode)
                </div>
                <div class="item val" style="width: 270px;">
                    @Html.ValidationMessageFor(m => m.City)
                    @Html.ValidationMessageFor(m => m.State)
                    @Html.ValidationMessageFor(m => m.ZipCode)
                </div>
            </div>

            <div class="editor-label">
                @Html.LabelForWithReq(m => m.LocalAccommodations)
            </div>
            <div class="editor-field">
                @Html.TextAreaFor(m => m.LocalAccommodations, new { @class = "adminRichText" })
            </div>
            @if (Model != null) { <text>@Html.HiddenFor(m => m.Id)</text> }
            <p class="buttons">
                <input type="submit" value="Submit" />
            </p>
        </fieldset>
    </div>
}